<div class="form">

	<?php
	$properties = array(
		'id'=>'news-form',
		'enableAjaxValidation'=>false,
	);
	$form = $this->beginWidget('CActiveForm', $properties);
	$htmlOptions = array('size'=>60, 'maxlength'=>255, 'class'=>'fill');
	?>

	<p class="note">
		Fields with <span class="required">*</span> are required.
	</p>

	<?php echo $form->errorSummary($model); ?>

	<?php if (!$model->isNewRecord): ?>
		<div class="row">
			<?php
			echo $form->labelEx($model, 'sticky');
			echo $form->checkBox($model, 'sticky');
			echo $form->error($model, 'sticky');
			?>
		</div>

		<div class="row">
			<?php
			echo $form->labelEx($model, 'hidden');
			echo $form->checkBox($model, 'hidden');
			echo $form->error($model, 'hidden');
			?>
		</div>
	<?php endif; ?>

	<?php if ($model->type == News::TYPE_WEB): ?>
		<div class="row">
			<?php
			echo $form->labelEx($model, 'sender');
			echo $form->textField($model, 'sender', $htmlOptions);
			echo $form->error($model, 'sender');
			?>
		</div>
	<?php endif; ?>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'contact');
		echo $form->textField($model, 'contact', $htmlOptions);
		echo $form->error($model, 'contact');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'value');
		$htmlOptions = array('rows'=>6, 'cols'=>50);
		echo $form->textArea($model, 'value', $htmlOptions);
		echo $form->error($model, 'value');
		?>
	</div>

	<div class="row buttons">
		<?php
		echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
		?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->